home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / lang_ext / vbawk / linecnt.usr < prev    next >
Encoding:
Text File  |  1994-08-14  |  1.1 KB  |  37 lines

  1.  
  2. 'This routine is called after each file is closed and
  3. 'all processing for that file is finished.
  4. Sub AfterAFile ()
  5.     WriteToStatus "Number of lines is " & FNR
  6. End Sub
  7.  
  8. 'This routine is called at the very end of the program,
  9. 'after all files have been processed.
  10. Sub AfterAllFiles ()
  11. End Sub
  12.  
  13. 'The return value of BeforeAFile is usually True, which
  14. 'indicates that the current file is to be processed
  15. 'normally.  By returning False, you can skip processing
  16. 'the current file.
  17. Function BeforeAFile ()
  18.     BeforeAFile = True
  19. End Function
  20.  
  21. 'This routine is executed at the very beginning of the
  22. 'application, before any files are opened or any
  23. 'processing has taken place.
  24. Function BeforeAllFiles ()
  25.     BeforeAllFiles = True
  26. End Function
  27.  
  28. 'This routine called over and over, each time being
  29. 'passed a succeeding line of the file being
  30. 'processed.  Or, in binary mode, this routine is passed
  31. 'a chunk of bytes as long as RECLEN, except for the
  32. 'final chunk which may be smaller than RECLEN.
  33. Function DoALine (TheLine As String) As Integer
  34.     DoALine = True
  35. End Function
  36.  
  37.